<template>
  <div class="zhenhuoyuedu">
    <div class="biaoge">
      <dv-scroll-ranking-board :config="config" />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      config: {
        data: [],
        waitTime: 4500,
        rowNum: 3,
        sort: true,
      },
    };
  },
  methods: {
    tubiao() {},
  },
  mounted() {
    this.tubiao();
    //村活跃度
    this.$axios
      .post("/fristpage/getVillageActivity")
      .then((response) => {
        response.data.data.name.forEach((element, index) => {
          this.config.data.push({
            name: element,
            value: Number(response.data.data.counts[index]),
          });
        });
        this.config = { ...this.config };
      })
      .catch((error) => {
        console.error();
      });
  },
};
</script>

<style lang="less" scoped>
.zhenhuoyuedu {
  height: 75%;
  padding: 15px;
}
.biaoge {
  height: 220px;
}
</style>